A service provider (SP) may use an Internet Protocol backbone (IP backbone) network to provide a virtual private network (VPN) for a user. A Layer 3 virtual private network (L3VPN) enables a host and a router to connect to each other based on a layer 3 address. The L3VPN may be a Border Gateway Protocol (BGP) VPN or a Multiprotocol Label Switching (MPLS) VPN.
A terminal device sends an Address Resolution Protocol (ARP) request to a provider edge (PE) device that is connected to the terminal device, so as to query a Media Access Control (MAC) address corresponding to an IP address of a remote terminal device in a same local area network. The PE receiving the ARP request returns a MAC address of the PE to the terminal device that sends the ARP request. The PE outward broadcasts, by using the BGP, host route information that is corresponding to a local terminal device and is in an ARP table. For example, the terminal device may be at least one of devices, such as a mobile phone, a personal computer (PC), an IP television (IPTV), and a tablet computer.
A VPN site (hereinafter referred to as site) is a location of a VPN user, and connects to an SP network by using a customer edge-provider edge link (CE-PE link). A site may be attached to at least one VPN. For example, a site 1 and a site 2 are attached to a same L3VPN. When a terminal device 1 in the site 2 accesses a terminal device 2 in site 2, a MAC address of the terminal device 2 is used as a destination MAC address.
When the terminal device 1 migrates from the site 2 to the site 1, the MAC address of the terminal device 2 may still be saved in an ARP table of the terminal device 1. When the terminal device 1 accesses the terminal device 2, the MAC address of the terminal device 2 is still used as a destination MAC address of a packet, which causes that the terminal device 1 cannot access the terminal device 2.